<template>
  <div>
    <h1>App</h1>
    <!-- sync修饰符，自动实现props数据的修改 -->
    <child :username.sync="username"></child>
  </div>
</template>

<script>
//引入子组件
import child from './components/Child.vue'
  export default {
    //注册子组件
    components:{
      child,
    },
     data(){
        return{
            username:'admin'
        }
    }
  }
</script>

<style lang="scss" scoped>

</style>